#!/usr/bin/env groovy

node {
    stage('checkout') {
        checkout scm
    }

    stage('check java') {
        sh "java -version"
    }

    stage('check maven') {
        sh "mvn -v"
    }

    stage('automation tests') {
        //run your build
        sh 'mvn clean verify   -Dcucumber.options="--tags @mobile_web_lp"  -Denv=Mobile'
        //generate cucumber reports
        //cucumber '**/cucumber.json'
        cucumber fileIncludePattern: 'target/json-cucumber-reports/*.json'
    }
}
